<!DOCTYPE html>
<html>
 <head> 
  <meta charset="UTF-8" /> 
  <title>新增权限组</title> 
  <link rel="stylesheet" href="/assets/layui/css/layui.css" media="all" />
 </head> 
 <body> 
  <div class="admin-main">  
   <form class="layui-form" action="/api/perm/permgroup/add" style="width: 700px;margin-top: 20px;" >  
    <div class="layui-form-item">
		<label class="layui-form-label">组名称</label>
		<div class="layui-input-block">
		   <input type="text" name="name" placeholder="权限组名称" lay-verify="required" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">所属平台</label>
		<div class="layui-input-block">
		   <select name="platformType" lay-filter="platformType" changeJoinEvent='{"renderType":"select","target":"#menuSelect","dataUrl":"/api/perm/menu/options?platformType="}'>
              <option value="">选择平台</option>
              <option value="console-admin">运营端</option>
              <option value="console-company">企业端</option>
          </select> 
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">关联菜单</label>
		<div class="layui-input-block">
		   <select id="menuSelect" name="menuId" lay-verify="required" lay-filter="menuId" changeJoinEvent='{"renderType":"checkbox","target":"#apiList","dataUrl":"/api/perm/menu/apis?menuId=","attrName":"apiIds","noneMessage":"请先配置菜单关联接口"}'>
		      <option value="">选择菜单</option>
          </select> 
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">关联接口</label>
		<div class="layui-input-inline" style="width: 500px;" id="apiList"></div>
		<div class="layui-input-inline" style="width: 50px;">
           <a id="batchCheck" class="layui-btn layui-btn-warm layui-btn-sm" href="javascript:;">全选</a>
        </div>
	</div>
    <div class="layui-form-item"> 
     <div class="layui-input-block"> 
        <input type="button"  class="layui-btn layui-btn-normal J_ajaxSubmit" value="保存"/>
        <input type="reset" class="layui-btn layui-btn-primary" value="重置"/>
     </div> 
    </div> 
   </form> 
  </div> 
 </body>
<script type="text/javascript" src="/assets/layui/layui.js"></script>
<script type="text/javascript" src="/modules/permgroup/permgroup.js"></script>
<script>
var pageType = "add";
</script>
</html>